import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2023-04-07
 * Time: 17:35
 */
public class test14 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()){
            int n = scan.nextInt();
            if(n == 0){
                break;
            }
            long a = (long) (Math.pow(5,n) - 4);
            long b = (long) (Math.pow(4,n) +n -4);
            System.out.println(a + " " +b);
        }
    }
}
